package L1;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * 到底有多二
 */
public class _017 {
    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        String s = reader.readLine();
        double num = 0;
        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) == '2') {
                num++;
            }
        }
        int length = s.length();
        if (s.charAt(0) == '-') {
            if ((s.charAt(length - 1) - '0') % 2 == 0) {
                System.out.println(String.format("%.2f", (num / (length - 1)) * 1.5 * 2 * 100) + "%");
            } else {
                System.out.println(String.format("%.2f", (num / (length - 1)) * 1.5 * 100) + "%");
            }
        } else {
            if ((s.charAt(length - 1) - '0') % 2 == 0) {
                System.out.println(String.format("%.2f", (num / length) * 2 * 100) + "%");
            }
            System.out.println(String.format("%.2f", (num / length) * 100) + "%");
        }
    }
}
